<!DOCTYPE html>
<html>
<head>
    <title>申请列表列表</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/font-awesome.min.css">
    <link rel="stylesheet" href="/plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="/plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="/css/main.css">
    <script src="/libs/jquery.min.js"></script>
    <script src="/libs/jquery.form.js"></script>
    <script src="/plugins/layer/layer.js"></script>
    <script src="/libs/bootstrap.min.js"></script>
    <script src="/libs/vue.min.js"></script>
    <script src="/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="/plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="/plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/libs/bootstrapValidator.js"></script>
    <script src="/libs/bootstrapValidator.min.js"></script>
</head>
<body>
<div id="main" v-cloak>
    <form class="form-horizontal" role="form" :model="requirement"  id="reqForm" method="post" enctype="multipart/form-data" onsubmit="return false" >
        <input  type="hidden" id="goodsPathOriganl" name="goodsPathOriganl" >
        <input  type="hidden" id="rewardPathOriganl" name="rewardPathOriganl" >
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label" >名称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="name" name="name" placeholder="请输入名称" v-model="requirement.name"  required>
                <input type="hidden" class="form-control" id="goodsKeySearchLists" name="goodsKeySearchLists"  v-model="requirement.goodsKeySearchLists"   >
            </div>
        </div>
        <div class="form-group">
            <label for="goodsPath1" class="col-sm-2 control-label" >商品</label>
            <div class="col-sm-10">
                <!--v-model="requirement.goodsPath"-->
                <input class="form-control" type="file"  id="goodsPath1" name="goodsPath1"  ref="inputer"  @change="goodsPathChange(event)">
                <span style="font-size: 5px;color: #8aa4af;">*试用商品图片</span></br>
                <img src="" id="goodsPathImg" style="width: 200px;margin-top: 10px;display: none" >
            </div>
        </div>
        <div class="form-group">
            <label for="rewardPath1" class="col-sm-2 control-label" >奖励图片</label>
            <div class="col-sm-10">
                <!--v-model="requirement.rewardPath"-->
                <input class="form-control" type="file"  id="rewardPath1" name="rewardPath1"  ref="inputer"  @change="rewardPathChange(event)">
                <span style="font-size: 5px;color: #8aa4af;">*奖励物品图片</span></br>
                <img src="" id="rewardPathImg" style="width: 200px;margin-top: 10px;display: none" >
            </div>
        </div>
        <div class="form-group">
            <label for="price" class="col-sm-2 control-label" >下单价</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="price" id="price" placeholder="请输入价格" v-model="requirement.price" change="countMoney()" required>
            </div>
        </div>
        <div class="form-group">
            <label for="brokerage" class="col-sm-2 control-label" >奖励金</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="brokerage" id="brokerage" placeholder="请输入奖励金" v-model="requirement.brokerage" change="countMoney()">
            </div>
        </div>
        <div class="form-group">
            <label for="num" class="col-sm-2 control-label" >数量</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="num" name="num" placeholder="请输入数量" v-model="requirement.num" change="countMoney()">
            </div>
        </div>

        <div class="form-group">
            <label for="mode" class="col-sm-2 control-label" >收费模式</label>
            <div class="col-sm-10">
                <select class="form-control" v-model="requirement.mode" id="mode" name="mode">
                    <option v-for ="(item,idx) in modeList" :value ="item.code" >{{item.name}} </option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="type" class="col-sm-2 control-label" >闪电试用</label>
            <div class="col-sm-10">
                <select class="form-control" v-model="requirement.type" id="type" name="type">
                    <option value ="1" >是</option>
                    <option value ="0" >否</option>
                </select>
                <span style="font-size: 5px;color: #8aa4af;">*闪电类型无需审核试客资格</span></br>
            </div>
        </div>
        <div class="form-group">
            <label for="platformId" class="col-sm-2 control-label" >平台类型</label>
            <div class="col-sm-10">
                <select class="form-control" v-model="requirement.platformId" id="platformId" name="platformId">
                    <option v-for ="(item,idx) in ptList" :value ="item.id" >{{item.name}} </option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="price" class="col-sm-2 control-label" >活动天数</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="daysNum" id="daysNum" placeholder="请输入活动天数" v-model="requirement.daysNum" change="countMoney()" required>
            </div>
        </div>
        <div class="form-group">
            <label for="goodsRange" class="col-sm-2 control-label" >设置关键词</label>
            <div class="col-sm-10">
            <table class="goods_key_search">
            <tr height="50" v-for="item in requirement.GoodsKeySearchList">
	            <td style="padding-right: 15px;">
	            <select class="form-control goodsRange" name="goodsRange" style="padding-right: 0px;" id="goodsRange">
					<option value="1" >所有宝贝</option>
					<option value="2" >天猫</option>
					<option value="3" >二手</option>
				</select>
	            </td>
	            <td style="padding-right: 15px;">
	            <select class="form-control goodsRank" name="goodsRank" style="padding-right: 0px;">
					<option value="0" >综合排序</option>
					<option value="1" >销量</option>
					<option value="2" >价格</option>
				</select>
	            </td>
	            <td style="padding-right: 15px;">
	            	<input type="text" class="form-control" name="keyWord" placeholder="关键词"   >
	            </td>
	            <td style="padding-right: 15px;">
	            	<input type="text" class="form-control" name="pageInfo" placeholder="大概在第几页第几行"   >
	            </td>
	            <!-- <td><div>价格：<input type="text" class="form-control" name="priceStart" placeholder=""   >-</div></td>
	            <td></div><input type="text" class="form-control" name="priceEnd" placeholder=""   ></td>-->
	            <td><input type="text" class="form-control" name="sendAddress" placeholder="发货地"   ></td> 
            </tr>
            </table>
               
            </div>
        </div>
        <div class="form-group">
            <label for="description" class="col-sm-2 control-label" >要求</label>
            <input type="hidden" id="descriptionValue" name="description" >
            <div class="col-sm-10">
            <iframe id="description" frameborder=0 width="100%" height=500 marginheight=0 marginwidth=0 scrolling=no
                    src="/libs/kindeditor/kindEditor.htm"></iframe>
        </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="button" class="btn btn-default" id="subReq" data-toggle="modal" data-target="#infoModal">发布</button>
            </div>
        </div>
    </form>
    <div id="infoConfirm" style="display:none">
        <table>
            <tr>
                <td style="width: 50%;text-align:right">单价:</td>
                <td v-html="info.price" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">奖励金:</td>
                <td v-html="info.brokerage" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">数量:</td>
                <td v-html="info.num" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">平台管理费:</td>
                <td v-html="info.platBrokerage" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">置顶:</td>
                <td v-html="info.platTopPrice" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">代返款费率:</td>
                <td v-html="info.platRate" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">总金额:</td>
                <td v-html="info.total" style="text-align:left"></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">计算公式：</td>
                <td style="text-align:left"><span style="font-size: 5px">(单价+奖励金+管理费+置顶+代返款费率*单价)*数量</span></td>
            </tr>
            <tr>
                <td style="width: 50%;text-align:right">账户余额:</td>
                <td v-html="info.balance" style="text-align:left"></td>
            </tr>
        </table>
        <div class="row" style="">
            <button @click="subRequirement" id="subRequirement" v-if="info.msg==null" style="text-decoration:none;background:#2f435e;color:#f2f2f2;float: right">发布</button>
            <span v-else v-html="info.msg" style="color:red"></span>
        </div>
    </div>
</div>
<style>
    #infoConfirm
    {
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 16px;
        background: #fff;
        margin: 15px;
        border-collapse: collapse;
    }
    #infoConfirm td
    {
        color: #669;
        padding: 9px 8px 0px 8px;
    }
    #infoConfirm tbody tr:hover td
    {
        color: #009;
    }

</style>
<script src="/js/com.js"></script>
<script src="/libs/bootstrap-datetimepicker.js"></script>
<script src="/js/desc.js"></script>
<script src="/js/merchant/requirement.js"></script>
</body>
</html>